package com.activemq.springtest.start;
import org.apache.activemq.broker.BrokerService;

public class TxBroker {
    public static void main(String[] args) throws Exception {
        BrokerService brokerService=new BrokerService();
        //启动broker的jvm监控功能
        brokerService.setUseJmx(true);
        //设置broker名字
        brokerService.setBrokerName("text_Broker");
        //是否使用持久话
        brokerService.setPersistent(false);

        //添加连接协议，地址
        brokerService.addConnector("tcp://127.0.0.1:61616");
        brokerService.start();
    }
}
